$(function() {
    //用户退出
    let layer = layui.layer
    $("#logout").on('click',function() {
        //提示框-layui官网-内置模块-弹出层-复制代码
        layer.confirm('确认退出登录吗', {icon:3,title:'提示'},function() {
            //跳转页面到登录页，清除token
            location.href = '/login.html'
            localStorage.removeItem("token")
            layer.close(index)
        })
    })
})